package com.gupaoedu.springcloud.config.springcloudnacosconfig;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class SpringCloudNacosConfigApplication {

	public static void main(String[] args) {
		ConfigurableApplicationContext context=
				SpringApplication.run(SpringCloudNacosConfigApplication.class, args);
		while(true){
			String info=context.getEnvironment().getProperty("info");
			System.out.println(info);
			try {
				Thread.sleep(5000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}

	}
}
